﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace ThesisSystem.Models
{
    public class Target
    {
        [Key]
        public int TargetID { get; set; }

        [DisplayName("指标概括")]
        [StringLength(100)]
        [Required(ErrorMessage="*")]
        public string Summary { get; set; }

        [DisplayName("学科")]
        public string TypeName { get; set; }

        [DisplayName("权重")]
        [Range(1,10,ErrorMessage=("1到10之前，可取1和10"))]
        public int Weight { get; set; }

        [DisplayName("指标内容")]
        [StringLength(500)]
        [Required(ErrorMessage = "*")]
        public string Content { get; set; }

        //[DisplayName("所属评卷")]
        //public int MarkingID { get; set; } 

        //一个指标属于一张评卷
        public virtual ICollection<Marking> Markings { get; set; }
    }
}